package vip.xiaonuo.smzq.modular.lifecycle.constant;

/**
 * 系统返回常量
 */
public enum WebResultStatusConstant {

    // ====== 请求结果
    // 成功
    SUCCESS_OPERATION(200, "操作成功"),
    FAILE(-1,"失败"),
    // 授权相关
    // 登录授权相关
    SECURITY_LOGIN(200,"登录成功"),
    SECURITY_REGISTER(200,"注册成功"),
    SECURITY_REGISTERERROR(500,"注册失败"),
    SECURITY_LOGINOUT(200,"注销成功"),
    SECURITY_NAMEERROE(202,"用户不存在"),
    SECURITY_PWDERROE(203,"密码错误"),
    SECURITY_NOLOGIN(204,"用户未登录"),
    SECURITY_UNPDERROE(205,"用户名或者密码错误"),
    SECURITY_UNLOCKED(206,"用户被锁定"),
    SECURITY_NAMEREPEAT(209,"用户名重复"),
    SECURITY_CODEEXPIRE(210,"验证码过期"),
    SECURITY_CODEERROR(212,"验证码不一致"),
    SECURITY_UNKNOWN(299,"网络异常，请稍后重试"),
    SECURITY_FORBID(403,"权限不足"),



    // 用户相关

    // 业务相关
    PROCESS_CREATE(3001, "数据创建失败"),
    PROCESS_EDIT(3002, "数据编辑失败"),
    PROCESS_DELETE(3003, "数据删除失败"),
    PROCESS_CANCEL(3012, "任务取消失败"),
    PROCESS_WARN(3004, "数据不可操作"),
    PROCESS_REPRT(3005, "数据重复"),
    PROCESS_NULL(3006, "没有此数据"),
    NODE_DIR(3011, "当前节点为目录节点,不可进行数据配置"),
    FILE_NO_EXIST(3008,"文件不存在"),

    NOFILE_OPERATION(3012, "文件不存在"),
    POOL_EXIST(3013, "数据池中已存在"),
    // 参数相关
    ARGUMENT_ERROR(4001, "参数为空或格式不正确"),

    // 系统异常
    SERVER_ERROR(5001, "系统异常"),

    /*文件相关*/
    FILE_HDFS_NO_EXIST(6001, "文件不在数据池中"),


    NO_DATA(6002,"数据不存在"),

    HAS_SENSTTIVE(6003,"存在敏感词"),
    FILE_TYPE_NO_ALLOW(6004,"文件类型不允许"),

    REPETITION(6005,"重复"),

    DATA_EMPTY(6006,"数据为空"),
    /*自定义*/
    CUSTOM(6007,""),
//    当前节点比第一个节点大
    CUR_THAN_FIRST(6008,"当前节点比第一个节点大");
//    SUCCESS(200, "success"),
//    FAIL(400, "fail"),
//    VISIT_NOT_AUTHORIZED(401, "未授权"),
//    ARGUMENT_ERROR(402,"参数错误"),
//    ARGUMENT_EXCEPTION(407, "参数存在异常"),
//    ARGUMENT_TOKEN_EMPTY(409, "Token为空"),
//    ARGUMENT_TOKEN_INVALID(410, "Token无效"),
//    SERVER_ERROR(501, "服务端异常"),
//    SERVER_SQL_ERROR(503,"数据库操作出现异常"),
//    SERVER_DATA_REPEAT(504, "服务器数据已存在"),
//    SERVER_DATA_NOTEXIST(505,"数据不存在"),
//    SERVER_DATA_STATUS_ERROR(506, "数据状态错误"),
//    SERVER_SMS_SEND_FAIL(701, "短信发送失败"),


    private Integer code;
    private String msg;

    private WebResultStatusConstant(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    private WebResultStatusConstant() {
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

}
